package com.zmzncs.lmtc.module.finance.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zmzncs.lmtc.common.util.DateTimeUtil;
import com.zmzncs.lmtc.module.customer.dao.CardRecordDao;
import com.zmzncs.lmtc.module.customer.pojo.card_record.CardRecordDTO;
import com.zmzncs.lmtc.module.finance.dao.TransactionRecordDao;
import com.zmzncs.lmtc.module.finance.pojo.TransactionRecord;
import com.zmzncs.lmtc.module.finance.pojo.TransactionRecordDTO;
import com.zmzncs.lmtc.module.finance.pojo.TransactionRecordForm;
import com.zmzncs.lmtc.module.finance.pojo.TransactionSummaryRecordDTO;
import com.zmzncs.lmtc.module.finance.service.TransactionRecordService;
import com.zmzncs.lmtc.module.order.dao.OrderInfoDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * <p>
 * 财务-总交易记录表 服务实现类
 * </p>
 *
 * @author JD
 * @since 2021-04-07
 */
@Service
public class TransactionRecordServiceImpl extends ServiceImpl<TransactionRecordDao, TransactionRecord> implements TransactionRecordService {
    @Autowired
    private TransactionRecordDao transactionRecordDao;


    /**
     * 获取列表
     *
     * @param searchForm
     */
    @Override
    public IPage<TransactionRecordDTO> getTransactionRecordPage(TransactionRecordForm searchForm){
        return transactionRecordDao.list(new Page(searchForm.getCurrentPage(), searchForm.getPageSize()),searchForm);
    }

    /**
     * 查询财务-总交易汇总金额
     */
    @Override
    public TransactionSummaryRecordDTO selectTransactionSummary() {
        return transactionRecordDao.selectTransactionSummary();
    }
}
